Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-64917

When Jira is behind a Microsoft-based HTTP server some functions can result in a 400 Bad Request error

    XMLWordPrintable

Details

    • 7.03
    • 96
    • Severity 2 - Major
    • 170
    • Hide
      Atlassian Update –

      7th March 2018
      Hi everyone,

      I am happy to announce that we have addressed the issue starting with the 7.6.4 Server version. Please have a look at the Fix Version/s field for the list of subsequent versions that will include the fix as well.

      This flaw turned out to be a manifestation of a wider, cross-product problem. We have improved loading of the dialog in terms of reliability. At the same time, for that any such occurrences rely heavily on an actual Jira's configuration (e.g. installed plugins) and we were not able to test all the possible setups, an error dialog containing suggested workaround will be presented to a user shall the Link Issue dialog fail to render ever again. The workaround is
      https://confluence.atlassian.com/display/JIRAKB/JIRA+elements+fail+to+render+with+HTTP+400+error  it proved to be efficient every time it was applied.
      We will be also monitoring performance of the Link Issue dialog in order to assess whether further action is needed.

      Cheers,
      Pawel Drygas
      Developer, Jira Server

      Show
      Atlassian Update – 7th March 2018 Hi everyone, I am happy to announce that we have addressed the issue starting with the 7.6.4 Server version. Please have a look at the Fix Version/s field for the list of subsequent versions that will include the fix as well. This flaw turned out to be a manifestation of a wider, cross-product problem. We have improved loading of the dialog in terms of reliability. At the same time, for that any such occurrences rely heavily on an actual Jira's configuration (e.g. installed plugins) and we were not able to test all the possible setups, an error dialog containing suggested workaround will be presented to a user shall the Link Issue dialog fail to render ever again. The workaround is https://confluence.atlassian.com/display/JIRAKB/JIRA+elements+fail+to+render+with+HTTP+400+error   it proved to be efficient every time it was applied. We will be also monitoring performance of the Link Issue dialog in order to assess whether further action is needed. Cheers, Pawel Drygas Developer, Jira Server

    Description

      Problem

      When JIRA is behind a Microsoft-based HTTP server, like IIS. JIRA functions, like page views or attempting to create an issue link, can result in a 400 Bad Request.

      Steps to Reproduce

      • Setup JIRA behind IIS
      • Load an issue ticket and attempt to create an issue link
      • Browser will receive a 400 Bad Request

      Investigation

      As of JIRA 7.3.2+, we plugin assets have been added to the request URLs. For example, when attempting to create an issue link the request looks like this:

      • JIRA 7.3.2+
        https://mylocaljira.com/jira/s/0d089a0b9496e6961b46a6ff0fab3577-T/-2kdf3u/73014/a14cb145fcf53a0dac96c288c8cb2f1c/df1080717d136496574968aba23f1092/_/download/contextbatch/js/jira.edit.issue,-_super,-jira.view.issue,-atl.general,-jira.rich.editor,-jira.navigator.kickass,-com.atlassian.jira.plugins.jira-development-integration-plugin:devstatus-dialog-resources-ctx,-viewissue.standalone,-jira.navigator.advanced,-jira.navigator.simple,-jira.general/batch.js?agile_global_admin_condition=true&healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jag=true&jaguser=true&jira-nps-enabled=true&jira.create.linked.issue=true&locale=en-US&nps-acknowledged=true&nps-not-opted-out=true&richediton=true
        
        https://mylocaljira.com/jira/s/649b65f752be8a25102e4977ed4ad1b5-CDN/-7gc8qi/73013/b6b48b2829824b869586ac216d119363/9dd2b02e9d3fe3341364f22c6a6ff474/_/download/contextbatch/css/com.atlassian.jira.jira-issue-link-confluence-plugin:init-issuelink-confluence,com.atlassian.jira.jira-issue-link-remote-jira-plugin:init-issuelink-jira,-_super,-jira.view.issue,-com.atlassian.jira.plugins.jira-development-integration-plugin:devstatus-dialog-resources-ctx,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true&user-logged-in=true
      • JIRA 7.3.0
        https://mylocaljira.com/jira/s/3a8c8215538460d1de361096983a5fdb-CDN/5yyz52/73011/a14cb145fcf53a0dac96c288c8cb2f1c/d07793104d5bb382d7a5a8b494b2c59a/_/download/contextbatch/js/com.atlassian.jira.jira-issue-link-remote-jira-plugin:init-issuelink-jira,-_super,-jira.view.issue,-jira.navigator.kickass,-viewissue.standalone/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true
        

      Specifically pay attention to this section of the URL:

      • long_jira_url/download/contextbatch/js/<EVERYTHING_HERE>/batch.js?rest_of_url

      Cause

      Due to the URL length increase, we are reaching the Windows Path Limit of 260 characters. This not the IIS URL limit. More details here:

      Workaround

      From the above articles, it is possible to modify the Windows Registry of the IIS server and increase the UrlSegmentMaxLength value to handle more characters:

      1. Backup the Registry
      2. With Regedit, browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters
      3. Find the value for UrlSegmentMaxLength (or if it doesn't exist add a DWORD value), and change it to 00001000 (this is the hex for 4096)

      Powershell alternative:

      Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\HTTP\Parameters -Name UrlSegmentMaxLength -Value 4096 -type DWord
      

      After using either method to adjust the registry (Regedit or Powershell), you must restart Windows for the changes to take effect. This will necessitate downtime, please plan a maintenance window accordingly.

      Attachments

        Issue Links

          Activity

            People

              pdrygas Pawel Drygas (Inactive)
              dchan David Chan
              Votes:
              18 Vote for this issue
              Watchers:
              46 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: